package planet.administracion;

import java.io.IOException;
import java.util.Collection;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import comun.Articulo;
import comun.DAOFactory;
import comun.Empleo;




public class ListaArticuloServlet extends HttpServlet {

    public void service(HttpServletRequest request,HttpServletResponse response)
      throws ServletException, IOException {
      // --- Obtenemos el DAOFactory y luego el DAO especifico
      DAOFactory objDAOFactory=DAOFactory.getDAOFactory(DAOFactory.ORACLE);
      Articulo objArticulo = objDAOFactory.getArticulo();
      System.out.println("llego al servlet");
      try {
        Collection listaDatos = objArticulo.listarArticulo();
        request.setAttribute("listaart",listaDatos);
        
        getServletContext().getRequestDispatcher("/cineplanet/administracion/frm_cineplanet_manto_articulo.jsp").forward(request,response);
      } catch (Exception e) {

				System.out.println(e.getMessage());
			}
		}

	
}
